package cn.miju.ser.alipay.vo;

import cn.miju.ser.common.vo.BaseInVO;
import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <pre>
 * 订单退款
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-03-02 16:00
 */
@Data
@ApiModel
@EqualsAndHashCode(callSuper = true)
public class AlipayRefundOrderInVO extends BaseInVO {

    /**
     * 商户订单号，与服务商交易单号不能同时为空
     */
    @ApiModelProperty(value = "商户订单号，与服务商交易单号不能同时为空")
    @JSONField(name = "out_trade_no", ordinal = 1)
    private String outTradeNo;
    /**
     * 服务商交易单号
     */
    @ApiModelProperty(value = "服务商交易单号")
    @JSONField(name = "trade_no", ordinal = 2)
    private String tradeNo;
    /**
     * 商户退款单号
     */
    @ApiModelProperty(value = "商户退款单号", required = true)
    @NotBlank(message = "传入商户退款单号不能为空")
    @JSONField(name = "out_refund_no", ordinal = 3)
    private String outRefundNo;
    /**
     * 退款金额,单位：分
     */
    @ApiModelProperty(value = "退款金额,单位：分", required = true)
    @JSONField(name = "refund_amount", ordinal = 4)
    @NotNull(message = "传入退款金额不能为空")
    @Min(value = 1, message = "传入退款金额不能小于1")
    private Integer refundAmount;

}
